package DataStructures.pokerhands;

import java.util.List;

import DataStructures.Card;

public abstract class Hand implements Comparable<Hand> {
	
	public static final int POKER_HAND_SIZE = 5;
	
	protected Card[] cards;
	
	public Hand(Card[] cards) {
		if(cards.length != POKER_HAND_SIZE){
			throw new IllegalArgumentException("A Poker hand must consist of exactly 5 cards");
		}
		this.cards = cards;
		determineHandValue();
	}
	
	/**
	 * This method is used to determine a hands value in the case of a tie.  It is important that the value of the different cards
	 * in a hand be set so that they can be used to accurately determine the winner when comparing hands.
	 * Should throw an IAE if a hand is not valid.
	 */
	protected abstract void determineHandValue() throws IllegalArgumentException;

}
